package com.diandian.backend.order.controller;

import com.diandian.backend.order.service.OrderOnlineElemeSourceService;
import com.diandian.base.boot.starter.response.BaseResult;
import com.diandian.backend.order.param.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 饿了么订单原始数据
 *
 * @author zyz diandian@qq.com
 * @since 1.0.0 2025-07-16
 */
@RestController
@RequestMapping("/order/online/eleme/source")
public class OrderOnlineElemeSourceController {

    @Autowired
    private OrderOnlineElemeSourceService orderOnlineElemeSourceService;

    @PostMapping("/add")
    public BaseResult add(@RequestBody OrderOnlineElemeSourceAddParam param) {
        orderOnlineElemeSourceService.add(param.toDTO());
        return new BaseResult(0, "success", null);
    }
}